<div class="layui-fluid layui-anim website-anim-up" id="website-class-solicit-detail" lay-title="课题查看">
    <div class="layui-row layui-col-space8 website-container">
        <div class="layui-col-md10 layui-col-sm10 layui-col-xs10">
            <div class="layui-card" id="client-solicit-info">
                <div class="layui-card-header">基本情况</div>
                <div class="layui-card-body">

                    <div class="layui-row">
                        <!-- 基本信息-->
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">征集公告名称：</div>
                            <div class="layui-col-xs9 layui-col-sm9 layui-col-md9">[[${result.noticeName}]]</div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6 ">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">建议课题名称：</div>
                            <div class="layui-col-xs9 layui-col-sm9 layui-col-md9">[[${result.topicName}]]</div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">学科分类：</div>
                            <div id="subjectTypeCode" class="layui-inline layui-col-xs9 layui-col-sm9 layui-col-md9">
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6 ">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">建议人姓名：</div>
                            <div class="layui-col-xs9 layui-col-sm9 layui-col-md9">[[${result.userName}]]</div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6 ">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">建议单位：</div>
                            <div class="layui-col-xs9 layui-col-sm9 layui-col-md9">[[${result.unitName}]]</div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">职称级别：</div>
                            <div id="titleTypeCode" class="layui-col-xs9 layui-col-sm9 layui-col-md9"></div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">职称：</div>
                            <div class="layui-col-xs9 layui-col-sm9 layui-col-md9">[[${result.professionCode}]]</div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">座机：</div>
                            <div class="layui-col-xs9 layui-col-sm9 layui-col-md9">[[${result.phone}]]</div>
                        </div>

                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6 ">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">手机号：</div>
                            <div class="layui-col-xs9 layui-col-sm9 layui-col-md9">[[${result.mobile}]]</div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">行政职务：</div>
                            <div id="positionTypeCode" class="layui-col-xs9 layui-col-sm9 layui-col-md9"></div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs12 layui-col-sm12 layui-col-md12">
                            <div class="layui-col-xs2 layui-col-sm2 layui-col-md2">建议立项依据摘要：</div>
                            <textarea class="layui-textarea layui-disabled" readonly>[[${result.proveContent}]]</textarea>

                        </div>
                    </div>
                </div>

                <div class="layui-card-footer">
                    <button class="layui-btn layui-btn-warm" id="clean">返回</button>
                </div>
            </div>

        </div>
    </div>
</div>

<script data-th-inline="javascript" type="text/javascript">
    layui.use(['jquery', 'laydate', 'form', 'table', 'website', 'dict'], function () {
        let $ = layui.jquery,
            laydate = layui.laydate,
            website = layui.website,
            form = layui.form,
            $view = $('#website-class-solicit-detail'),
            result = [[${result}]],
            $clean = $('#clean')
        ;
        // 重新渲染 form否则不会显示下拉框
        form.render();
        $clean.on('click', function () {
            let currentUrl = window.location.hash.replace('#', '');
            website.view.tab.del(currentUrl);
            window.location.reload();
        })
        $("#positionTypeCode").text(result.position ? layui.dict.getByCode(result.position).name : '');
        $("#titleTypeCode").text(result.academic ? layui.dict.getByCode(result.academic).name : '');


        $("#subjectTypeCode").text(result.subjectTypeCodes ? subjectTypeCodeName(result.subjectTypeCodes) : '');

        function subjectTypeCodeName(data) {
            let dicts = layui.dict.getByCodes(data)
            let name = ''
            for (let i = 0; i < dicts.length; i++) {
                name += dicts[i].name + ','
            }
            return name
        }

    })


</script>